<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mycss3</title>
    <style>
        html {   /*根元素字号为20px*/
            font-size: 20px;
        }
        .c1 {
            font-size: 2rem;   /*字号为根元素大小的2倍*/
            /*color: rgb(80, 80, 80);*/
            /*color: #e76f4a;*/
            color: chocolate;
        }
        .c2 {
            font-size: 2em;    /*字号为当前大小的2倍*/
        }
    </style>
</head>
<body>
<div>元素</div>
<div class="c1">
    父元素
    <div class="c2">子元素</div>
</div>
</body>
</html>